package com.eece411.project.p2;

// Interface for the composite pattern
public interface Instance {
	public boolean put(byte[] key,byte[] data, boolean b) throws deadException;
	public byte[] get(byte[] key) throws deadException;
	public boolean remove(byte[] key, boolean b) throws deadException;
	public boolean containsKey(byte[] key) throws deadException;
	public int getLatency();
	int compareTo(Instance instance);
	int hashCode();
	boolean equals(String s);
}

// Exception for a Instance that doesnt reply.
class deadException extends Exception {
	private static final long serialVersionUID = 1L;
	deadException(String s) {
	      super(s);
	}
}